package template.impl;

import template.ArrayPrint;

import java.util.Arrays;
import java.util.Comparator;

public class PrintStyle1 extends ArrayPrint {
    public PrintStyle1(Integer[] contents) {
        super(contents);
    }

    @Override
    protected void sort() {
        Arrays.sort(contents, Comparator.comparingInt(a -> a));
    }

    @Override
    protected void format() {
        for (Integer content : contents) {
            System.out.println(content);
        }
    }
}
